# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Elrondo46 TuxnVape <elrond94@hotmail.com>
# Contributor: Ivan Fonseca <ivanfon@riseup.net>
# Contributor: Alfredo Ramos <alfredo dot ramos at yandex dot com>
# Contributor: Giacomo <giacomogiorgianni at gmail dot com>

pkgname=vokoscreen
_pkgname=vokoscreenNG
pkgver=3.6.0
pkgrel=1
pkgdesc='Easy to use screencast creator'
arch=('loong64' 'x86_64')
url='https://linuxecke.volkoh.de/vokoscreen/vokoscreen.html'
license=('GPL2')
depends=('gst-plugins-good' 'qt5-multimedia' 'qt5-x11extras')
optdepends=('gst-plugins-bad: record audio into AAC format'
            'gst-plugins-ugly: record screen into H.264 format')
makedepends=('qt5-tools')
source=("https://github.com/vkohaupt/$_pkgname/archive/$pkgver/$_pkgname-$pkgver.tar.gz"
        '0001-Add-better-integration-for-Linux.patch')
sha256sums=('2fa15aa7f51c00c5257456f9d1cc9b1fd5415b9cd0ac21cba6383608019c2c1e'
            '422d0cd05d2fe1a1973f8eb50e95c7e4898ce3afeae97b7e67ab384f3958ffa2')

prepare() {
  cd $_pkgname-$pkgver
  patch -Np1 -F3 -i ../0001-Add-better-integration-for-Linux.patch
}

build() {
  cd $_pkgname-$pkgver
  qmake-qt5 PREFIX=/usr src/vokoscreenNG.pro
  make
}

package() {
  cd $_pkgname-$pkgver
  make INSTALL_ROOT="$pkgdir" install
}
